class RegisterController {

    def index = { }
    def toRegister = {
        if(params.selectsort){
            if(params.selectsort == '1'){
                redirect(action:"create",controller:"student")
            }else{
                redirect(action:"create",controller:"teacher")
            }
        }else{
            redirect(action:"index")

        }
    }
}
